package com.ia.aistream.manager.authen.token;

import com.ia.aistream.common.utils.IdUtils;
import com.ia.aistream.manager.authen.conf.TokenFrom;
import lombok.Getter;
import org.apache.shiro.authc.UsernamePasswordToken;

import java.util.UUID;

/**
 * 账号名登录token
 *
 * @author chenjunsheng
 */
@Getter
public class UserLoginToken extends UsernamePasswordToken {

    private final TokenFrom tokenFrom;

    private final String tokenId;

    public UserLoginToken(String username, String password, TokenFrom tokenFrom) {
        super(username, password);
        this.tokenFrom = tokenFrom;
        this.tokenId = IdUtils.fastUUID();
    }
}
